]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
brightnessManager: Propagate any attempted brightness change
authorSebastian Wick <sebastian.wick@redhat.com>
Thu, 30 Oct 2025 10:43:19 +0000 (11:43 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 30 Oct 2025 12:25:19 +0000 (12:25 +0000)
The BrightnessScale was trying to be smart by not notifying changes of
its value when an action on it (stepUp, stepDown, cycleUp, set value)
resulted in no change.

It turns out that users do want to see an OSD even when their action
resulted in no change.

Always notify about attempted changes instead.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8770
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3941>

js/misc/brightnessManager.js

index 71f9037637a44c4fef113467181d0ddf36bd47f8..eb4ad1b4615bceb06375bb6bd6fb2ad9d0f0d5ae 100644 (file)
@@ -331,10 +331,7 @@ export const BrightnessScale = GObject.registerClass({
     }
 
     _setValue(value) {
-        value = Math.clamp(value, 0.0, 1.0);
-        if (Math.abs(value - this._value) < SCALE_VALUE_CHANGE_EPSILON)
-            return;
-        this._value = value;
+        this._value = Math.clamp(value, 0.0, 1.0);
         this.notify('value');
     }
 });